Page({
  data: {
    notifyDetail: {},
  },
  // 获取页面路径参数
  onLoad(params) {
    console.log(params)
    this.getNotifyDetail(params.id)
  },
  async getNotifyDetail(id) {
    // 发请求
    const { data: notifyDetail, code } = await wx.http.get('/announcement/' + id)
    if (code !== 10000) return wx.utils.toast()

    this.setData({ notifyDetail })
  },
})
